1. Field of the Invention
The present invention relates to an optical card having a registered region for directory modified information, and a file management method for the optical card.
2. Statement of the Related Art
Recently, an optical disk and an optical card have been widespread as optical information recording media. In these optical information recording media, information is transferred between an application program and these media by a BIOS (basic input and output system) which functions as a part of an OS (operating system) of a microcomputer.
Generally, files are managed by a directory consisting of file groups for managing files in which information, such as a sector number, has been written. That is, a directory information registered region is provided in a recording medium. In this region, directory information including a file name, a file length and a sector number of the first data is stored. Therefore, a file is effectively managed and easily accessed. Especially, the memory capacity in an optical recording medium is relatively large and many files can be stored, so that the file management by the directory becomes important.
Since former optical cards frequently use write-once-media and place a restriction on writing, various methods of managing files by using a directory have been considered. For example, where a whole system contains rewritable media, such as a hard disk, a method of storing directory information of an optical card (abbreviated as directory information, hereinafter) on the media is considered.
However, an optical card has excellent portability and can be used for an unspecified plurality of systems. Accordingly, directory information has not been recorded on the media to be used. In this case, the directory information is kept in a floppy disk as rewritable and portable media. Thus, it is necessary to carry both the optical card of former type and this floppy disk, so that this optical card is not practical.
Also, a directory information registered region can be provided on the media. FIG. 1 is an explanatory view showing an optical card of a prior art example. A directory information registered region 2 and file data region 3 are provided on an optical card 1. Each file data is recorded in the file data region 3. The directory information registered region 2 is formed as an original form of the media which is different from the form of the directory management by using an OS of a microcomputer (not illustrated) which controls input and output of data.
Generally, a file under an OS is managed by directory information and file allocation information. The head position of a file is shown by the directory information and a linkage indicating the sector where this file is written in is shown by the file allocation information. However, in an optical card of a prior art example, the directory information including a file name, a file length and a sector number of the first track number is written in the directory information registered region 2 when a file is written in the file data region 3. Therefore, the file allocation information is not needed in the optical card and the directory information is written in the directory information registered region 2 which is differently formed from a file management form under an OS.
The OS has a program for copying a file, a program for writing the directory information in the directory information registered region 2 of an original form of the media and a program for displaying the directory information in the same way as the display of the directory by the OS.
The file is written in the optical card 1, for example, from a floppy disk to the file data region 3 by executing a file copy program in the OS. To the contrary, a file in the file data region 3 is copied in a floppy disk by executing the file copy program.
However, as mentioned above, since the form of the directory information registered region 2 is basically different from a file management form under the OS, for example, a function including opening/closing and reading/writing of a file by a function call of the OS, cannot be used. Accordingly, even if a file is read from the file data region 3, first of all, it is necessary to copy the file in a floppy disk by the copy program.
Further, a method for providing the directory information registered region on the former optical card by the OS can be considered. In this case, a file deleting command is not allowed and the region is always managed so as to add a file. Also, a modifying command of the directory information is not allowed.
However, not allowing the file deleting command is unduly restrictive. Also, a renaming function of a file cannot be used because a modifying command of the directory information is not allowed. In this case, a method of deleting a file by overwriting on the directory information can be also used. The overwriting is equal to deleting a subject file in view of the OS.
Nevertheless, since the directory information is overwritten, a position of the sector in which the subject file is recorded becomes unclear and the OS errs in its judgement in that the sector where the subject file is recorded is an empty data region. Thus, a new data might be written in this sector, and it becomes a problem in which an error is made when the data is written and in which changing sector process has frequently occurred.
In the Gazette of Japanese Patent Laid Open No. 690721/1988, an area which shows a deleted file in the head of a track number stored area of a file in a directory area is provided and when, this area, such as a (flag) bit is changed to "1", a file can be easily and logically deleted even in an additional writing type information recording medium. Thus, it is planned to make the same directory format for write-once-media as the format of a floppy disk in accordance with the file management form under an OS and to operate the format similarly. However, because the write-once-media is different from the floppy disk, for example, once a deleting file process, that is, a (flag) bit is changed to "1", the bit cannot be changed to "0" after that and, therefore, it is difficult to revive the deleted file. Also, once an attribute of a file is changed, the attribute cannot be changed after that. For example, if a file is adjusted to be an invisible state for a fixed period of time and desired to return to a visible state after the period, the file can be easily returned to a visible state in a rewritable floppy disk provided that the bit showing the attribute is changed, while it cannot be returned because it is write-once-media.
That is, it is considered that the file management form under the OS is suitably determined at first assuming as rewritable recording media.. Therefore, because similar directory format which is not rewritable recording media is not rewritable, a function of the format is limited to only once or the function itself is limited (actually prohibited). Thus, even if the write-once-media is adjusted to the directory format of rewritable media, it is necessary to judge whether to receive an using function or not after the used number of times in the past is examined depending on the function. Accordingly, it is the weak point that the file management becomes quite complicated.
Also, in the Gazette of Japanese Patent Laid Open No. 91888/1988, a directory forming method is disclosed. The method can logically delete an unnecessary file by recording deleting directory information which shows a deleted file in a directory area. By using this method, a host computer controls a file by deleting the directory shown as a deleted directory. Also, in this prior art example, once deleted directory information is recorded, it is difficult to logically revive the deleted file by the deleted directory information after that.
Also, in the above mentioned two gazettes, a weak point is that a file renaming function cannot be used.